﻿using System;
using Atomic.Common;
using Atomic.Db;
using Atomic.Permission.Entities;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace Atomic.Permission
{
    public interface IRoleFormFun : IError
    {
        /// <summary>
        /// 添加角色功能权限
        /// </summary>
        /// <param name="entity">功能权限信息</param>
        /// <returns>是否添加成功</returns>
        bool Add(RoleFormFunEntity entity);

        /// <summary>
        /// 删除角色功能权限信息
        /// </summary>
        /// <param name="id">功能权限ID</param>
        /// <returns></returns>
        bool Remove(int id);

        /// <summary>
        /// 获取角色所有有效功能权限列表
        /// </summary>
        /// <param name="roleID">角色ID</param>
        /// <returns>角色权限列表</returns>
        List<RoleFormFunEntity> GetList(Expression<Func<RoleFormFunEntity, bool>> predicate = null);
    }
}
